Generate a Decimal MAC

Command:

Generate a Decimal MAC on character.

Notes:

This command assumes that the data on which the MAC is to be generated consists of characters only.

The cipher scheme used depends upon the key length.

Single length WWK –   Cipher scheme code 0

Double length WWK –  Cipher scheme code 1 (X9.19 MAC)

 

Field

Length & Type

Details

COMMAND MESSAGE

Message Header

m A

(Subsequently returned to the Host unchanged).

Command Code

2 A

Value LK.

TAK

16H or 1A+32H

The TAK encrypted under LMK pair 16-17.

MAC Length

1 H

Number of characters required in Decimal MAC (range 1 to 12).

Data

0 - n

The data on which a MAC is to be generated, n= 1024 (512 for SNA-SDLC) systems.

End Message Delimiter

1 C

Optional. Must be present if a message trailer is present. Value X'19.

Message Trailer

n A

Optional. Maximum length 32 characters.

RESPONSE MESSAGE

Message Header

m A

Returned to the Host unchanged.

Response code

2 A

Value LL


Error Code

2 N

00 : No errors
10 : TAK parity error
12 : No keys loaded in user storage
13 : LMK error; report to supervisor
15 : Error in input data
21 : Invalid user storage index

27 : Invalid key length

MAC

n N

The calculated decimal MAC with a length as specified in the command.

End Message Delimiter

1 C

Will only be present if present in the command message. Value X'19.

Message Trailer

n A

Will only be present if in the command message. Maximum length 32 characters.